find second largest and second smallest numbers in a list in python